package com.qn.visitor.config;

import nl.basjes.parse.useragent.UserAgentAnalyzer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
 * qingniu-cloud user source analysis
 *
 * @Author: TXG
 * @Date: 2024/6/11
 * @Version V0.0.2
 */
@Configuration
public class UserAgentAnalyzerConfig {

    @Bean
    public UserAgentAnalyzer initUaa() {
        //默认缓存10W数据
        return UserAgentAnalyzer
                .newBuilder()
                .hideMatcherLoadStats()
                .withCache(100000)
                .build();
    }
}
